package com.csw.shuanfa.entity;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Component;

@Mapper
@Component
public interface BlackDao {


    @Select("select * from black_p where uid=#{id}")
    Black queryByUid(@Param("id") String id);

    @Update("update black_p set count=count-1 where uid=#{black.uid}")
    void updateCount(@Param("black") Black black);
}
